package com.maybach.core.manager;

import com.maybach.util.query.support.PageResult;
import com.maybach.common.model.LoanOrderDO;
import com.maybach.common.query.LoanOrderQuery;

import java.util.List;


/**
 * Manager for LoanOrder.
 */
public interface LoanOrderManager {
    /**
     * query count by query condition.
     */
    int countByQuery(LoanOrderQuery query);

    /**
     * delete by query condition.
     */
    int deleteByQuery(LoanOrderQuery query);

    /**
     * delete by primary key.
     */
    int deleteByPrimaryKey(LoanOrderDO record);

    /**
     * insert selective.
     */
    long insertSelective(LoanOrderDO record);

    /**
     * select by query condition.
     */
    List<LoanOrderDO> selectByQuery(LoanOrderQuery query);


    /**
     * select by query condition with page.
     */
    PageResult<LoanOrderDO> selectByQueryWithPage(LoanOrderQuery query);

    /**
     * select by primary key.
     */
    LoanOrderDO selectByPrimaryKey(Long id);

    /**
     * update by query condition selective.
     */
    int updateByQuerySelective( LoanOrderDO record,  LoanOrderQuery query);

    /**
     * update by query condition.
     */
    int updateByQuery(LoanOrderDO record, LoanOrderQuery query);

    /**
     * update by primary key selective.
     */
    int updateByPrimaryKeySelective(LoanOrderDO record);

    /**
     * 根据外部订单好查询
     * @param outOrderId
     * @return
     */
    LoanOrderDO selectByOutOrderId(Long outOrderId);
}